import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.read_excel('服装销售数据.xlsx')
df['总销售额(元)'] = df.groupby({'针织衫':'总销售额','卫衣':'总销售额','连衣裙':'总销售额'},axis=1).agg('sum')
plt.figure(figsize=(10,5))
sns.set_style(style='white',rc={'font.sans-serif':'SimHei'})
sns.set_palette(sns.color_palette('husl',5))
sns.barplot(x=df['总销售额(元)'],y=df['门店'])
ax = plt.gca()
for p in ax.containers:
    ax.bar_label(container=p,label_type='edge')
plt.title('各门店服装总销售额条形图')
plt.show()
